package com.atguigu.tingshu.account.service;

import com.atguigu.tingshu.model.account.UserAccount;
import com.atguigu.tingshu.vo.account.AccountDeductVo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;

public interface UserAccountService extends IService<UserAccount> {

    /**
     * @author WeakMoon
     * @date 2025/02/23 23:52:09
     * 用户注册初始化账户金额
     */
    void register(Long userId);

    /**
     * @author WeakMoon
     * @date 2025/03/09 14:15:45
     * 获取当前用户可用金额
     */
    BigDecimal getAvailableAmount(Long userId);

    /**
     * @author WeakMoon
     * @date 2025/03/10 15:47:12
     * 检查及扣减账户余额
     */
    Boolean checkAndDeduct(AccountDeductVo accountDeductVo);

}
